package org.TCPcase1;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class Client {

    public static void main(String[] args) throws IOException {
        Socket socket=new Socket("127.0.0.1",10086);
        BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
        while (true) {

            Scanner sc=new Scanner(System.in);
            String data=sc.nextLine();
            bw.write(data+"/n");
            bw.flush();
            if (data.equals("关闭")){
                break;
            }
        }
        socket.close();
    }
}
